package com.stedu.mall.common.service;

import com.github.pagehelper.PageInfo;
import com.stedu.mall.common.bean.User;
import com.stedu.mall.common.exception.SteduException;

public interface UserService {
    //登录
    User login(String username, String password) throws SteduException;
    //添加
    boolean insert(User user) throws SteduException;
    //根据id搜索
    User selectById(Integer id);

    //支付金额
    boolean update(User u) throws SteduException;
    //修改个人信息
    boolean updateInfo(User u) throws SteduException;
    //充值
    boolean updateMoney(User u) throws SteduException;
    //修改支付密码 updatePwd
    boolean updatePayPwd(Integer id,  String newPayPwd,String oldPayPwd) throws SteduException;



    //修改登录密码
    boolean updatePwd(Integer id,  String newPayPwd,String oldPayPwd) throws SteduException;


    //进行身份认证
    boolean updateCertifying(User u) throws SteduException;

    boolean updateSetPwd(Integer id, String loginPwd, String payPwd) throws SteduException;

    PageInfo<User> condition(User condition, Integer pageNum, Integer pageSize);

    boolean resetPwd (User user);


}
